/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package management;

import entity.Bill_Detail;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

/**
 *
 * @author Windows7
 */
public class ManagerBill {
    //select @@identity

    PreparedStatement ps = null;
    public static String sql_Bill_Bill_Detail = "select Bill_Id, Staff_Id, Customer_Id, Total_Money, Create_Date, Pay from Bill ";  
    public static boolean updateBill(int id_Ma,int status, int id) {
        String sql = "update Bill set Staff_Id = '"+id_Ma+"', Pay = '" + status + "' where Bill_Id = '" + id + "' ";
        try {
            PreparedStatement ps = null;
            ps = MyConnection.getConnection().prepareStatement(sql);
            ps.executeUpdate();
            return true;
        } catch (SQLException ex) {
            ex.printStackTrace();
            return false;
        }
    }
}
